package com.lili;

import com.lili.entity.Student;
import org.junit.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class MyTest1 {

	//普通beanDefinition对象解析流程
	@Test
	public void test1(){
		ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext("spring.xml");
		Student bean = applicationContext.getBean(Student.class);
		System.out.println(bean.getUserName());
	}

	//某个特定元素的解析lookup-method
//	@Test
//	public void test2(){
//		ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext("spring.xml");
//		People bean = applicationContext.getBean(People.class);
//		System.out.println(bean.getUserName());
//	}
}
